/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package javaclientcp3110.Model.Component;

import common.Objects.Component;
import common.DAO.Factory.DAOFactory;

/**
 *
 * @author Richard Irons
 */
public class CompDeleteModel {
    private Component deleteComponent;

    public CompDeleteModel() {
        deleteComponent = new Component();
    }

    public Component getDeleteComponent() {
        return deleteComponent;
    }

    public void setDeleteComponent(Component deleteComponent) {
        this.deleteComponent = deleteComponent;
    }

    public boolean deleteComponent() {
        if (deleteComponent != null) {
            return DAOFactory.getDAOFactory().getComponentDAO().deleteComponent(deleteComponent.getId());
        } else {
            return false;
        }
    }
}
